inherited fmAddVacation: TfmAddVacation
  Left = 564
  Top = 180
  Width = 1024
  Height = 704
  Caption = #1044#1086#1073#1072#1074#1083#1077#1085#1080#1077'/'#1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1085#1080#1077' '#1054#1090#1087#1091#1089#1082#1072' '#1080#1083#1080' '#1041#1086#1083#1100#1085#1080#1095#1085#1086#1075#1086
  Constraints.MinHeight = 313
  Constraints.MinWidth = 702
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 639
    Width = 1008
  end
  inherited Panel1: TPanel
    Width = 1008
    inherited BitBtn1: TBitBtn
      Left = 833
    end
    inherited BitBtn2: TBitBtn
      Left = 921
    end
  end
  object cxDBVerticalGrid1: TcxDBVerticalGrid [2]
    Left = 0
    Top = 45
    Width = 513
    Height = 594
    Align = alLeft
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -15
    Font.Name = 'Arial'
    Font.Style = []
    OptionsView.RowHeaderWidth = 143
    OptionsBehavior.RowSizing = True
    OptionsBehavior.RowTracking = False
    OptionsBehavior.AllowChangeRecord = False
    OptionsData.CancelOnExit = False
    OptionsData.Appending = False
    OptionsData.Deleting = False
    OptionsData.DeletingConfirmation = False
    ParentFont = False
    TabOrder = 2
    DataController.DataSource = dlgDS
    object cxDBVerticalGrid1DBEditorRow1: TcxDBEditorRow
      Properties.Caption = #1060#1048#1054' '#1089#1086#1090#1088#1091#1076#1085#1080#1082#1072
      Properties.EditPropertiesClassName = 'TcxLookupComboBoxProperties'
      Properties.EditProperties.DropDownRows = 10
      Properties.EditProperties.KeyFieldNames = 'PID'
      Properties.EditProperties.ListColumns = <
        item
          Caption = #1060#1048#1054
          Width = 40
          FieldName = 'PP'
        end
        item
          Caption = #1044#1086#1083#1078#1085#1086#1089#1090#1100
          Width = 40
          FieldName = 'SDNAME'
        end>
      Properties.EditProperties.ListSource = dsSotr
      Properties.DataBinding.FieldName = 'PID'
    end
    object cxDBVerticalGrid1DBEditorRow2: TcxDBEditorRow
      Properties.Caption = #1058#1080#1087' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      Properties.EditPropertiesClassName = 'TcxLookupComboBoxProperties'
      Properties.EditProperties.KeyFieldNames = 'SDID'
      Properties.EditProperties.ListColumns = <
        item
          FieldName = 'SDNAME'
        end>
      Properties.EditProperties.ListOptions.ShowHeader = False
      Properties.EditProperties.ListSource = dsTypeDoc
      Properties.DataBinding.FieldName = 'VTYPE'
    end
    object cxDBVerticalGrid1DBEditorRow4: TcxDBEditorRow
      Properties.Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
      Properties.DataBinding.FieldName = 'VDATE_BEGIN'
    end
    object cxDBVerticalGrid1DBEditorRow5: TcxDBEditorRow
      Properties.Caption = #1044#1072#1090#1072' '#1086#1082#1086#1085#1095#1072#1085#1080#1103
      Properties.DataBinding.FieldName = 'VDATE_END'
    end
    object cxDBVerticalGrid1DBEditorRow6: TcxDBEditorRow
      Height = 100
      Properties.Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
      Properties.EditPropertiesClassName = 'TcxMemoProperties'
      Properties.DataBinding.FieldName = 'VNOTE'
    end
  end
  object Panel2: TPanel [3]
    Left = 513
    Top = 45
    Width = 495
    Height = 594
    Align = alClient
    BevelOuter = bvNone
    Caption = 'Panel2'
    TabOrder = 3
    object dxBarDockControl1: TdxBarDockControl
      Left = 0
      Top = 0
      Width = 495
      Height = 26
      Align = dalTop
      BarManager = dxBarManager1
    end
    object PdfViewer1: TPdfViewer
      Left = 0
      Top = 26
      Width = 495
      Height = 568
      Align = alClient
      About = 'Synactis PDF Viewer version 1.0'
      AutoOpen = True
      Copies = 1
      EndPage = 0
      FitMode = vmFitBoxHorz
      LayoutMode = lmDontCare
      PageMode = pmStandard
      ShowPrintDialog = True
      ShowScrollBars = True
      ShowToolBar = True
      ShrinkToMargins = True
      StartPage = 1
    end
  end
  inherited dlgDS: TDataSource
    DataSet = fdsVacation
    Top = 8
  end
  object dxBarManager1: TdxBarManager
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -12
    Font.Name = 'Segoe UI'
    Font.Style = []
    Categories.Strings = (
      'Default')
    Categories.ItemsVisibles = (
      2)
    Categories.Visibles = (
      True)
    ImageOptions.Images = DMInv.cxSmallImages
    PopupMenuLinks = <>
    ShowHint = False
    UseSystemFont = True
    Left = 353
    Top = 9
    DockControlHeights = (
      0
      0
      0
      0)
    object dxBarManager1Bar1: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      Caption = 'Custom 1'
      CaptionButtons = <>
      DockControl = dxBarDockControl1
      DockedDockControl = dxBarDockControl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 573
      FloatTop = 348
      FloatClientWidth = 0
      FloatClientHeight = 0
      ItemLinks = <
        item
          Visible = True
          ItemName = 'cxBarEditItem1'
        end
        item
          BeginGroup = True
          Visible = True
          ItemName = 'bbOpen'
        end
        item
          Visible = True
          ItemName = 'dxBarButton2'
        end>
      NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object bbOpen: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 1
      OnClick = bbOpenClick
    end
    object dxBarButton2: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 10
      OnClick = dxBarButton2Click
    end
    object cxBarEditItem1: TcxBarEditItem
      Caption = #1050#1086#1087#1080#1103' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      Category = 0
      Hint = #1050#1086#1087#1080#1103' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      Visible = ivAlways
      Width = 100
      PropertiesClassName = 'TcxLabelProperties'
    end
  end
  object fdsSotr: TpFIBDataSet
    SelectSQL.Strings = (
      
        'SELECT D.PID, (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      'SD.SDNAME'
      'FROM DOLJNOST_PEOPLE D'
      'INNER JOIN DOLJNOST DOL ON DOL.DOLID = d.DOLID'
      'INNER JOIN PEOPLE P ON P.PID = D.PID'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DOL.SDID'
      
        'WHERE (CURRENT_DATE BETWEEN D.DOLDATEBEGIN AND COALESCE(d.DOLDAT' +
        'EEND, CURRENT_DATE)) AND d.dolisdelete is null'
      'AND (CURRENT_DATE <= COALESCE(dol.DOLDATEEND, CURRENT_DATE) )'
      'order by 2')
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    Left = 48
    Top = 8
    object fdsSotrSDNAME: TFIBStringField
      FieldName = 'SDNAME'
      Size = 255
      EmptyStrToNull = True
    end
    object fdsSotrPP: TFIBStringField
      FieldName = 'PP'
      Size = 767
      EmptyStrToNull = True
    end
    object fdsSotrPID: TFIBIntegerField
      FieldName = 'PID'
    end
  end
  object fdsVScanDoc: TpFIBDataSet
    CachedUpdates = True
    UpdateSQL.Strings = (
      'UPDATE VACATION_SCAN'
      'SET '
      '    VID = :VID,'
      '    VSSCAN = :VSSCAN'
      'WHERE'
      '    VSID = :OLD_VSID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    VACATION_SCAN'
      'WHERE'
      '        VSID = :OLD_VSID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO VACATION_SCAN('
      '    VSID,'
      '    VID,'
      '    VSSCAN'
      ')'
      'VALUES('
      '    :VSID,'
      '    :VID,'
      '    :VSSCAN'
      ')')
    RefreshSQL.Strings = (
      'select * from vacation_scan vs'
      'where(  vs.vid = :vid'
      '     ) and (     VS.VSID = :OLD_VSID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select * from vacation_scan vs'
      'where vs.vid = :vid')
    AutoUpdateOptions.UpdateTableName = 'VACATION_SCAN'
    AutoUpdateOptions.KeyFields = 'VSID'
    AutoUpdateOptions.AutoReWriteSqls = True
    AutoUpdateOptions.CanChangeSQLs = True
    AutoUpdateOptions.GeneratorName = 'GEN_VACATION_SCAN_ID'
    AutoUpdateOptions.UpdateOnlyModifiedFields = True
    AutoUpdateOptions.WhenGetGenID = wgOnNewRecord
    AutoUpdateOptions.SeparateBlobUpdate = True
    AfterInsert = fdsVScanDocAfterInsert
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    UpdateTransaction = DMInv.trFibWrite
    DataSource = dlgDS
    Left = 176
    Top = 8
    oStartTransaction = False
    object fdsVScanDocVSID: TFIBIntegerField
      FieldName = 'VSID'
      Origin = 'VACATION_SCAN.VSID'
    end
    object fdsVScanDocVID: TFIBIntegerField
      FieldName = 'VID'
      Origin = 'VACATION_SCAN.VID'
    end
    object fdsVScanDocVSSCAN: TFIBBlobField
      FieldName = 'VSSCAN'
      Origin = 'VACATION_SCAN.VSSCAN'
      Size = 8
    end
    object fdsVScanDocVSUSERENTER: TFIBStringField
      FieldName = 'VSUSERENTER'
      Origin = 'VACATION_SCAN.VSUSERENTER'
      Size = 40
      EmptyStrToNull = True
    end
    object fdsVScanDocVSTIMEENTER: TFIBDateTimeField
      FieldName = 'VSTIMEENTER'
      Origin = 'VACATION_SCAN.VSTIMEENTER'
    end
    object fdsVScanDocVSUSEREDIT: TFIBStringField
      FieldName = 'VSUSEREDIT'
      Origin = 'VACATION_SCAN.VSUSEREDIT'
      Size = 40
      EmptyStrToNull = True
    end
    object fdsVScanDocVSTIMEEDIT: TFIBDateTimeField
      FieldName = 'VSTIMEEDIT'
      Origin = 'VACATION_SCAN.VSTIMEEDIT'
    end
  end
  object fdsTypeDoc: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT t1.*'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, SDISDELETE)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, sd.SDISDELETE FROM' +
        ' SYS_DIC SD'
      '      WHERE sd.SDPARID = 47'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, sd1.SDISDELETE'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID, SDISDELETE FROM tree t'
      ') AS t1'
      'WHERE t1.SDISDELETE = 0'
      'order by 3')
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    Left = 128
    Top = 8
    object fdsTypeDocSDNAME: TFIBStringField
      FieldName = 'SDNAME'
      Size = 255
      EmptyStrToNull = True
    end
    object fdsTypeDocSDID: TFIBIntegerField
      FieldName = 'SDID'
    end
    object fdsTypeDocSDPARID: TFIBIntegerField
      FieldName = 'SDPARID'
    end
  end
  object dsSotr: TDataSource
    DataSet = fdsSotr
    Left = 16
    Top = 8
  end
  object dsTypeDoc: TDataSource
    DataSet = fdsTypeDoc
    Left = 96
    Top = 8
  end
  object odScan: TOpenDialog
    Filter = 'PDF|*.pdf'
    InitialDir = 'c:\'
    Left = 384
    Top = 8
  end
  object fdsVacation: TpFIBDataSet
    CachedUpdates = True
    UpdateSQL.Strings = (
      'UPDATE VACATION'
      'SET '
      '    PID = :PID,'
      '    VTYPE = :VTYPE,'
      '    VDATE_BEGIN = :VDATE_BEGIN,'
      '    VDATE_END = :VDATE_END,'
      '    VNOTE = :VNOTE,'
      '    VISDELETE = :VISDELETE'
      'WHERE'
      '    VID = :OLD_VID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    VACATION'
      'WHERE'
      '        VID = :OLD_VID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO VACATION('
      '    VID,'
      '    PID,'
      '    VTYPE,'
      '    VDATE_BEGIN,'
      '    VDATE_END,'
      '    VNOTE,'
      '    VISDELETE'
      ')'
      'VALUES('
      '    :VID,'
      '    :PID,'
      '    :VTYPE,'
      '    :VDATE_BEGIN,'
      '    :VDATE_END,'
      '    :VNOTE,'
      '    :VISDELETE'
      ')')
    RefreshSQL.Strings = (
      'select * from vacation v'
      'where(  v.vid = :vid'
      'and v.visdelete is null'
      '     ) and (     V.VID = :OLD_VID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select * from vacation v'
      'where v.vid = :vid'
      'and v.visdelete is null')
    AutoUpdateOptions.UpdateTableName = 'VACATION'
    AutoUpdateOptions.KeyFields = 'VID'
    AutoUpdateOptions.AutoReWriteSqls = True
    AutoUpdateOptions.CanChangeSQLs = True
    AutoUpdateOptions.GeneratorName = 'GEN_VACATION_ID'
    AutoUpdateOptions.UpdateOnlyModifiedFields = True
    AutoUpdateOptions.WhenGetGenID = wgOnNewRecord
    AutoUpdateOptions.SeparateBlobUpdate = True
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    UpdateTransaction = DMInv.trFibWrite
    Left = 296
    Top = 8
    oStartTransaction = False
    object fdsVacationVID: TFIBIntegerField
      FieldName = 'VID'
      Origin = 'VACATION.VID'
    end
    object fdsVacationPID: TFIBIntegerField
      FieldName = 'PID'
      Origin = 'VACATION.PID'
    end
    object fdsVacationVTYPE: TFIBIntegerField
      FieldName = 'VTYPE'
      Origin = 'VACATION.VTYPE'
    end
    object fdsVacationVDATE_BEGIN: TFIBDateField
      FieldName = 'VDATE_BEGIN'
      Origin = 'VACATION.VDATE_BEGIN'
    end
    object fdsVacationVDATE_END: TFIBDateField
      FieldName = 'VDATE_END'
      Origin = 'VACATION.VDATE_END'
    end
    object fdsVacationVUSERENTER: TFIBStringField
      FieldName = 'VUSERENTER'
      Origin = 'VACATION.VUSERENTER'
      Size = 40
      EmptyStrToNull = True
    end
    object fdsVacationVTIMEENTER: TFIBDateTimeField
      FieldName = 'VTIMEENTER'
      Origin = 'VACATION.VTIMEENTER'
    end
    object fdsVacationVUSEREDIT: TFIBStringField
      FieldName = 'VUSEREDIT'
      Origin = 'VACATION.VUSEREDIT'
      Size = 40
      EmptyStrToNull = True
    end
    object fdsVacationVTIMEEDIT: TFIBDateTimeField
      FieldName = 'VTIMEEDIT'
      Origin = 'VACATION.VTIMEEDIT'
    end
    object fdsVacationVISDELETE: TFIBIntegerField
      FieldName = 'VISDELETE'
      Origin = 'VACATION.VISDELETE'
    end
    object fdsVacationVNOTE: TFIBStringField
      FieldName = 'VNOTE'
      Origin = 'VACATION.VNOTE'
      Size = 2048
      EmptyStrToNull = True
    end
  end
  object fqCheck: TpFIBQuery
    Transaction = DMInv.trFibRead
    Database = DMInv.db
    SQL.Strings = (
      'SELECT v.VID'
      'FROM VACATION v'
      'WHERE v.PID = :pid'
      'AND v.VTYPE = :vtype'
      'AND v.VDATE_END >= :date1 AND v.VDATE_BEGIN <= :date2'
      'AND v.VID <> :vid')
    Left = 440
    Top = 8
    qoStartTransaction = True
  end
end
